package cian.dao;

import cian.base.SeeUser;
import cian.entity.Pager;
import cian.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface UserMapper {

    User findUserByUserName(String username);   //根据username查找用户 返回User类

    List<User> findAllUsers();  //查找所有用户

    int deleteByName(String username);  //根据username删除用户 删除成功返回1 不成功返回0

    int add(User user);

    List<User> pageHelper(@Param("username") String username);

    List<User> test(@Param("pageNo") int pageNo, @Param("pageMaxSize") int pageMaxSize);

    int deleteByUserName(@Param("username") String username);


    /*取得操作记录*/
    List<User> queryAllRecord(SeeUser seeUser);

    /*取得记录条数信息，通过当前用户的loginName查询*/
    int getCount(String username);

    int modifyByUserName(User user);
}